//退出登录
$(".out-login").click(function () {
    $.ajax({
        type:"get",
        url: "outLogin",
        success: function (result) {
            console.log("result:" + result);

            location.href = "http://localhost:8080/index.jsp";

        }

    })
})


getCustImg()
//得到照片url
function getCustImg() {
    $.ajax({
        type: "get",
        // contentType: "application/json",
        // data:
        //     `{"number":${number}}`
        // `{"numberPwd":${numberPwd}}`
        // ,
        // dataType: "json",
        url: "${pageContext.request.contextPath}/getCustImg",
        success: function (result) {
            // console.log("result:" + result);
            if (result===null||result===""){

            }else {
                var custImgUrl = document.getElementById("image");
                custImgUrl.src= result
                // console.log(custImgUrl)
            }

            // var pwd = result.data;
            // if (result.code === 200){
            //     if (pwd===numberPwd){
            //         location.href = "http://localhost:8080/index.jsp";
            //     }else {
            //         alert("账号或密码错误");
            //     }
            // }
            // else
            //     alert(result.data);
        }
    })
}



/*var container = document.querySelector(".all-context");
/!*监听所有事件*!/
container.onclick = function(event) {

    var element = event.target;
    if(element.className =="head_survey"){
        geren();
    }
    if(element.className =="head_survey1"){
        order();
    }
    if(element.className =="head_survey2"){
        review();
    }
    if(element.className =="head_survey3"){
        youhui();
    }
    if(element.className =="head_survey4"){
        setting();
    }

}*/
var a1= document.querySelector(".head_survey");
document.querySelector(".head_survey").onclick = function () {
    document.querySelector(".body-review4").style.display = "block"
    document.querySelector(".body-review3").style.display = "none"
    document.querySelector(".body-review2").style.display = "none"
    document.querySelector(".body-review1").style.display = "none"
    document.querySelector(".body-review").style.display = "none"
    a1.className ="asd";
    a2.className ="asf";
    a3.className ="asf";
    a4.className ="asf";
    a5.className ="asf";

}

var a2= document.querySelector(".head_survey1");
document.querySelector(".head_survey1").onclick = function () {
    document.querySelector(".body-review4").style.display = "none"
    document.querySelector(".body-review3").style.display = "block"
    document.querySelector(".body-review2").style.display = "none"
    document.querySelector(".body-review1").style.display = "none"
    document.querySelector(".body-review").style.display = "none"
    a2.className ="asd";
    a1.className ="asf";
    a3.className ="asf";
    a4.className ="asf";
    a5.className ="asf";
}
var a3= document.querySelector(".head_survey2");
document.querySelector(".head_survey2").onclick = function () {
    document.querySelector(".body-review4").style.display = "none"
    document.querySelector(".body-review3").style.display = "none"
    document.querySelector(".body-review2").style.display = "none"
    document.querySelector(".body-review1").style.display = "none"
    document.querySelector(".body-review").style.display = "block"
    a3.className ="asd";
    a1.className ="asf";
    a2.className ="asf";
    a4.className ="asf";
    a5.className ="asf";
}
var a4= document.querySelector(".head_survey3");
document.querySelector(".head_survey3").onclick = function () {
    document.querySelector(".body-review4").style.display = "none"
    document.querySelector(".body-review3").style.display = "none"
    document.querySelector(".body-review2").style.display = "block"
    document.querySelector(".body-review1").style.display = "none"
    document.querySelector(".body-review").style.display = "none"
    a4.className ="asd";
    a2.className ="asf";
    a3.className ="asf";
    a1.className ="asf";
    a5.className ="asf";
}
var a5= document.querySelector(".head_survey4");
document.querySelector(".head_survey4").onclick = function () {
    document.querySelector(".body-review4").style.display = "none"
    document.querySelector(".body-review3").style.display = "none"
    document.querySelector(".body-review2").style.display = "none"
    document.querySelector(".body-review1").style.display = "block"
    document.querySelector(".body-review").style.display = "none"
    a5.className ="asd";
    a1.className ="asf";
    a3.className ="asf";
    a4.className ="asf";
    a2.className ="asf";
}
/*==============================================*/
var b1=document.querySelector(".active");
document.querySelector(".active").onclick = function () {
    document.querySelector(".orders-body").style.display = "block"
    document.querySelector(".orders-body1").style.display = "none"
    document.querySelector(".orders-body2").style.display = "none"
    document.querySelector(".orders-body3").style.display = "none"
    document.querySelector(".orders-body4").style.display = "none"

    b1.className="active5";
    b2.className="active6";
    b3.className="active6";
    b4.className="active6";
    b5.className="active6";
}
var b2=document.querySelector(".active1");
document.querySelector(".active1").onclick = function () {
    document.querySelector(".orders-body").style.display = "none"
    document.querySelector(".orders-body1").style.display = "block"
    document.querySelector(".orders-body2").style.display = "none"
    document.querySelector(".orders-body3").style.display = "none"
    document.querySelector(".orders-body4").style.display = "none"
    b2.className="active5";
    b1.className="active6";
    b3.className="active6";
    b4.className="active6";
    b5.className="active6";

}
var b3=document.querySelector(".active2");
document.querySelector(".active2").onclick = function () {
    document.querySelector(".orders-body").style.display = "none"
    document.querySelector(".orders-body1").style.display = "none"
    document.querySelector(".orders-body2").style.display = "block"
    document.querySelector(".orders-body3").style.display = "none"
    document.querySelector(".orders-body4").style.display = "none"
    b3.className="active5";
    b2.className="active6";
    b1.className="active6";
    b4.className="active6";
    b5.className="active6";
}
var b4=document.querySelector(".active3");
document.querySelector(".active3").onclick = function () {
    document.querySelector(".orders-body").style.display = "none"
    document.querySelector(".orders-body1").style.display = "none"
    document.querySelector(".orders-body2").style.display = "none"
    document.querySelector(".orders-body3").style.display = "block"
    document.querySelector(".orders-body4").style.display = "none"
    b4.className="active5";
    b2.className="active6";
    b3.className="active6";
    b1.className="active6";
    b5.className="active6";
}
var b5=document.querySelector(".active4");
document.querySelector(".active4").onclick = function () {
    document.querySelector(".orders-body").style.display = "none"
    document.querySelector(".orders-body1").style.display = "none"
    document.querySelector(".orders-body2").style.display = "none"
    document.querySelector(".orders-body3").style.display = "none"
    document.querySelector(".orders-body4").style.display = "block"
    b5.className="active5";
    b2.className="active6";
    b3.className="active6";
    b4.className="active6";
    b1.className="active6";
}
